package com.example.cv.service.iml;

import com.example.cv.mapper.CandidateMapper;
import com.example.cv.model.Candidate;
import com.example.cv.model.Employer;
import com.example.cv.model.Position;
import com.example.cv.service.CandidateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 周杰
 */
@Service
public class CandidateServiceImpl implements CandidateService {
    public CandidateMapper candidateMapper;

    @Autowired
    public void setCandidateDao(CandidateMapper candidateMapper) {
        this.candidateMapper = candidateMapper;
    }

    @Override
    public Candidate findCandidate(Candidate candidate) {
        return candidateMapper.findCandidate(candidate);
    }

    @Override
    public boolean addCandidate(Candidate candidate) {
        return candidateMapper.addCandidate(candidate);
    }

    @Override
    public List<Position> findPositionsByParams(Position position) {
        return candidateMapper.findPositionsByParams(position);
    }

    @Override
    public List<Position> findAllPositions() {
        return candidateMapper.findAllPositions();
    }

    @Override
    public Candidate findCandidateById(int c_id) {
        return candidateMapper.findCandidateById(c_id);
    }

    @Override
    public boolean updateCanReleaseTime(Candidate candidate) {
        return candidateMapper.updateCanReleaseTime(candidate);
    }

    @Override
    public boolean deleteCanReleaseTime(Candidate candidate) {
        return candidateMapper.deleteCanReleaseTime(candidate);
    }

    @Override
    public boolean updateCandidate(Candidate candidate) {
        return candidateMapper.updateCandidate(candidate);
    }

    @Override
    public List<Position> findRecommendPositions(int c_id) {
        return candidateMapper.findRecommendPositions(c_id);
    }

    @Override
    public Position findPositionByPId(int p_id) {
        return candidateMapper.findPositionByPId(p_id);
    }

}
